<template>
	<div class="noexam_analysis">
		<el-table :data="tableData" stripe style="width: 100%">
			<el-table-column prop="deptName" label="单位"></el-table-column>
			<el-table-column prop="userName" label="姓名"></el-table-column>
			<el-table-column prop="account" label="账号"></el-table-column>
			<el-table-column prop="phone" label="手机"></el-table-column>
			<div slot="empty" class="emptyBg">
				<el-empty :image-size="100"></el-empty>
			</div>
		</el-table>
		<Pagination :total="dataCount" :page.sync="queryData.page" :limit.sync="queryData.limit" @change="getNoexamListData" />
	</div>
</template>

<script>
import { queryNotSubmit } from '@/api/admin/exam/testExam';
export default {
	props: {
		examId: { type: String, default: '' }
	},
	data() {
		return {
			dataCount: 0,
			tableData: [],
			queryData: { page: 1, limit: 10 }
		};
	},
	filters: {
		showUserInfo(data) {
			return data.userName || '';
		}
	},
	watch: {
		examId: {
			handler() {
				this.getNoexamListData();
			},
			immediate: true
		}
	},
	methods: {
		//获取未参考考生列表数据
		async getNoexamListData() {
			let params = { ...this.queryData, id: this.examId };
			let result = await queryNotSubmit(params).then((res) => res.data);
			if (result.code === '0') {
				this.dataCount = parseInt(result.count);
				this.tableData = result.data || [];
			}
		}
	}
};
</script>

<style scoped></style>
